import { createRouter, createWebHistory } from 'vue-router'
import   DeptList  from '../views/dept/index.vue'
import   DeptHandler  from '@/views/dept/handler.vue'
import   EmpList  from '@/views/emp/index.vue'
import   EmpHandler  from '@/views/emp/handler.vue'
import Index from '@/views/index/index.vue'
import Layout from '@/views/layout/index.vue'
import Log from '@/views/log/index.vue'
import Login from '@/views/login/index.vue';

const routes = [

  {
    path: '/',
    component: Layout,
    children: [
       { path: '', component:Index},
      { path: '/', component: '/Index ' },
      { path: '/index', component: Index },
      { path: '/deptList', name: 'dept', component: DeptList },
      { path: '/deptHandler', name: 'deptHandler', component: DeptHandler },
      { path: '/empList', name: 'emp', component: EmpList },
      { path: '/empHandler', name: 'empHandler', component: EmpHandler },
      { path: '/log', component: Log },
    ]
  }, { path: '/login', component: Login }

];


const router = createRouter({
  history: createWebHistory(),
  routes,
});

export default router;

